<?php


namespace app\console;


use coco\App;
use coco\Command;
use coco\queue\Master;
use coco\queue\Worker;

class Queue
{
    private $queue;

    public function __construct(Command $command)
    {
        $param = $command->getParam();
        $this->queue = $param['-q'] ?? 'default';
    }


    public function start()
    {
        Master::start($this->queue);
    }

    public function stop()
    {
        Master::stop($this->queue);
    }

    public function reload()
    {
        Master::reload($this->queue);
    }

    public function restart()
    {
        Master::restart($this->queue);
    }
    public function status()
    {
        Master::status($this->queue);
    }

}